package com.hb.domain.user.assembler;

import com.hb.domain.user.entity.UserDo;
import com.hb.repository.entity.SysUser;
import com.hb.vo.UserVO;
import com.hb.vo.request.UserAddRequestVO;
import com.hb.vo.request.UserUpdateRequestVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @description: do对象转换器
 * @projectName: zhb-frame-build
 * @author: zhouhaizhi
 * @createTime: 2021/8/11 17:12
 * @version:1.0
 */
@Mapper(componentModel = "spring")
public interface UserDoConvert {

    @Mappings({})
    UserVO toVo(SysUser sysUser);

    @Mappings({})
    List<UserVO> toVoList(List<SysUser> sysUsers);

    @Mappings({})
    UserDo toDo(UserAddRequestVO userAddRequestVO);

    @Mappings({})
    UserDo toDo(UserUpdateRequestVO userUpdateRequestVO);

    @Mappings({})
    SysUser toEntity(UserDo userDo);
}
